﻿using LibNiconico.NiconicoApi.Internal;
using LibNiconico.NiconicoApi.PlayerStatus;
using LibNiconico.NiconicoApi.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace LibNiconico.NiconicoApi.HeartBeat
{
    /// <summary>
    /// ニコニコハートビートレスポンス
    /// </summary>
    public sealed class NicoHeartBeatResponse : NicoApiInfoXmlResponseBase
    {
        /// <summary>
        /// 取得したハートビート
        /// </summary>
        public NicoHeartBeat HeartBeat { get; private set; }

        private NicoHeartBeatResponse(XDocument document) : base(document) { }

        internal static NicoHeartBeatResponse Parse(XDocument document)
        {
            NicoHeartBeatResponse rslt = new NicoHeartBeatResponse(document);

            rslt.HeartBeat = NicoHeartBeat.Parse(document);
            rslt.HeartBeat.Time = rslt.Time;
            return rslt;
        }


    }
}
